import request from '@/utils/request'

export function getPages(params) {
  return request({
    url: '/sys/user/getPage',
    method: 'get',
    params
  })
}

export function excel(data) {
  return request({
    url: '/node/exportNode',
    method: 'post',
    responseType: 'blob',
    data
  })
}

export function getNodeTypeTree(params) {
  return request({
    url: '/sys/nodeType/getTree',
    method: 'get',
    params
  })
}

export function nodeTypeAdd(data) {
  return request({
    method: 'post',
    url: '/sys/nodeType/add',
    data: {
      ...data
    }
  })
}

export function nodeTypeDel(params) {
  return request({
    url: '/sys/nodeType/deleteById',
    method: 'get',
    params
  })
}

export function nodeTypeUpdate(data) {
  return request({
    url: '/sys/nodeType/edit',
    method: 'post',
    data
  })
}

export function getNodeTypeById(params) {
  return request({
    url: '/sys/nodeType/selectById',
    method: 'get',
    params
  })
}

export function getManageUnits(params) {
  return request({
    url: '/sys/nodeType/getManageUnits',
    method: 'get',
    params
  })
}

export function getFirstList(params) {
  return request({
    url: '/sys/nodeType/getFirstList',
    method: 'get',
    params
  })
}

export function getSecondList(data) {
  return request({
    url: '/sys/nodeType/getSecondList',
    method: 'post',
    data
  })
}

export function getThirdList(data) {
  return request({
    url: '/sys/nodeType/getThirdList',
    method: 'post',
    data
  })
}
